search string inside array of objects php

140

search string inside array of objects php -

$item = null;
foreach($array as $struct) {
    if ($v == $struct->ID) {
        $item = $struct;
        break;
    }
}

Comments

Submit
0 Comments